﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _07ConverterAnyToAnyNumeralSystem
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.Write("Coverting from numeral system of base:");
            int s = int.Parse(Console.ReadLine());
            Console.Write("Coverting to numeral system of base:");
            int d = int.Parse(Console.ReadLine());
            Console.Write("Enter nuber in base {0}:", s);
            string input = Console.ReadLine();
            string output = Convert.ToString(Convert.ToInt32(input, s), d); ;
            Console.Write("The number in base {0} is:{1}", d, output);
            Console.WriteLine();
        }
    }
}
